?@{
    ViewBag.Title = "Payment";
    Layout = "~/Views/Shared/_OperationStep.cshtml";
}

<h2>Payment</h2>

<form id="cardsForm" name="cardsForm" action="@Url.Action("SelectPayment", "Payments")" method="post">
    <input id="cardNumber" name="cardNumber" type="hidden" value=""/>
</form>

<div>
    @Html.Partial("_Cards")
</div>



@section cardsScript {
    <script type="text/javascript">
        $(function() {
            @if (!string.IsNullOrEmpty(ViewBag.SelectedCardIndex))
            {
                @:$($("tbody tr.row").get(@ViewBag.SelectedCardIndex)).addClass("selected");
                @:$("#paymentMenuItem").removeClass('invisible');
                @:$("#cardNumber").attr("value", $(".selected").find("td:first").text());
            }
        });
    </script>
     <script src="@Url.Content("~/Scripts/payments.js")" type="text/javascript"></script>
}

